import request from '@/utils/request'

// 查询分类
export function getCategory(data = {}) {
    return request({
        url: '/equipment/product/getCategory',
        method: 'post',
        data
    })
}


// 查询分类对应属性
export function cateProductParam(data) {
    return request({
        url: '/equipment/productCategory/detail',
        method: 'post',
        data
    })
}

// 添加商品
export function addProduct(data) {
    return request({
        url: '/equipment/product/addProduct',
        method: 'post',
        data
    })
}

// 商品详情
export function getProductDetail(data) {
    return request({
        url: '/equipment/product/detail',
        method: 'post',
        data
    })
}


// 一键估价
export function oneValuation(data) {
    return request({
        url: '/equipment/product/oneValuation',
        method: 'post',
        data
    })
}


// 编辑商品
export function editProduct(data) {
    return request({
        url: '/equipment/product/editProduct',
        method: 'post',
        data
    })
}


// 删除商品
export function deleteProduct(data) {
    return request({
        url: '/equipment/product/deleteProduct',
        method: 'post',
        data
    })
}


// 设置运费
export function setPostage(data) {
    return request({
        url: '/equipment/product/setPostage',
        method: 'post',
        data
    })
}


// 商品改价
export function changePrice(data) {
    return request({
        url: '/equipment/product/changePrice',
        method: 'post',
        data
    })
}

// 上下架
export function changeStatus(data) {
    return request({
        url: '/equipment/product/changeStatus',
        method: 'post',
        data
    })
}

// 查询我的商品列表
export function getProductList(query) {
    return request({
        url: '/equipment/product/list',
        method: 'get',
        params: query
    })
}

